package com.beta.cust.bind.controller;

import com.beta.cat.utils.JsonUtil;
import com.beta.cust.bind.api.request.CrmQueryReq;
import com.beta.cust.bind.api.service.IRpcCommonService;
import com.beta.elephant.vo.ResultVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


/**
 * @Auther: pcc
 * @Date: 2024/3/28 14:23
 * @Description:
 */
@Slf4j
@RestController
@RequestMapping
public class CommonController {

    @Autowired
    private IRpcCommonService rpcCommonService;

    @GetMapping("/query/crm")
    public ResultVO<Map<String,String>> queryCrm(CrmQueryReq latestReq) {
        log.info("queryCrm param:{}", JsonUtil.toJson(latestReq));
        return rpcCommonService.testCrmInterface(latestReq);
    }
}
